package com.ming.closeto.utils;

import android.app.Activity;
import android.graphics.Color;
import android.os.Build;
import android.support.annotation.RequiresApi;
import android.view.View;

public class SystemUiUtils {

    @RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
    public static void showWindowUI(Activity activity) {
        if (VersionUtils.isLollipop()) {
            View decorView = activity.getWindow().getDecorView();
            int option = View.SYSTEM_UI_FLAG_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_STABLE;
            decorView.setSystemUiVisibility(option);
            activity.getWindow().setStatusBarColor(Color.TRANSPARENT);
        } else {  // 5.0以下

        }
    }
}
